package com.ce.pms.occupation.model;

// Generated 2008-12-24 13:41:51 by Hibernate Tools 3.2.0.b9

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.ce.pms.system.occupation.model.ContractorInfoConfigDO;
import com.sitechasia.webx.core.model.IDomainObject;

/**
 * 实体名称: 整改项目派工 关联数据表:OM_PERFECT_ITEM_DISPATCH
 *
 * @author yandawei
 * @CreateDate:2008-12-24
 */
@Entity
@Table(name = "OM_PERFECT_ITEM_DISPATCH")
public class PerfectItemDispatchDO implements IDomainObject {

	/**
	 * 主键
	 */
	@Id
	@GeneratedValue
	@Column(name = "PERFECT_ITEM_DISPATCH_ID", unique = true, nullable = false)
	private Long keyword;

	/**
	 * 承包商设置
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CONTRACTOR_INFO_ID", nullable = false)
	private ContractorInfoConfigDO contractorInfoConfig;

	/**
	 * 派工单号 生成格式：PK+年月日+2位序号
	 */
	@Column(name = "DISPATCH_NUMBER", nullable = false, length = 15)
	private String dispatchNumber;

	/**
	 * 派工日期
	 */
	@Temporal(TemporalType.DATE)
	@Column(name = "DISPATCH_DATE", nullable = false, length = 19)
	private Date dispatchDate;

	/**
	 * 备注描述
	 */
	@Column(name = "DESCRIPTION", length = 200)
	private String description;

	/**
	 * 导出标志 1 ： 已导出0：未导出
	 */
	@Column(name = "EXP_STATUS", length = 200)
	private String expStatus;

	/**
	 * 需要整改项目列表
	 */
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "perfectItemDispatch")
	private Set<PerfectItemRequisitionDO> perfectItemRequisitions = new HashSet<PerfectItemRequisitionDO>();

	public PerfectItemDispatchDO() {
	}

	public PerfectItemDispatchDO(Long keyword) {
		this.keyword = keyword;
	}

	public String getDispatchNumber() {
		return this.dispatchNumber;
	}

	public String getExpStatus() {
		return expStatus;
	}

	public void setExpStatus(String expStatus) {
		this.expStatus = expStatus;
	}

	public void setDispatchNumber(String dispatchNumber) {
		this.dispatchNumber = dispatchNumber;
	}

	public Date getDispatchDate() {
		return this.dispatchDate;
	}

	public void setDispatchDate(Date dispatchDate) {
		this.dispatchDate = dispatchDate;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public ContractorInfoConfigDO getContractorInfoConfig() {
		return contractorInfoConfig;
	}

	public void setContractorInfoConfig(
			ContractorInfoConfigDO contractorInfoConfig) {
		this.contractorInfoConfig = contractorInfoConfig;
	}

	public Long getKeyword() {
		return keyword;
	}

	public void setKeyword(Long keyword) {
		this.keyword = keyword;
	}

	public Set<PerfectItemRequisitionDO> getPerfectItemRequisitions() {
		return perfectItemRequisitions;
	}

	public void setPerfectItemRequisitions(
			Set<PerfectItemRequisitionDO> perfectItemRequisitions) {
		this.perfectItemRequisitions = perfectItemRequisitions;
	}

}
